#!/bin/bash
#

for file in $(find /tmp/bj -type f);do
    dest_file=${file/bj/sh/}
    if [ ! -e $dest_file ];then
       echo "文件$dest_file 丢失"
    else
       file_md5=$(md5sum $file | awk '{print $1}')
       dest_file_md5=$(md5sum $dest_file | awk '{print $1}')
       if [ $dest_file_md5 != $file_md5 ];then
          echo "文件${dest_file}数据不一致"
       fi
    fi
done
